function p = gl_weight( n )
%
%  function p = gl_weight ( n )
%
%  For 2 <= N <= 7
%  N point Gauss-Legendre quadrature rule over the interval [-1,1].

switch( n )
  case 2
    p = [1; 1];
  case 3
    p = [0.55555555555555555555; 0.88888888888888888888; 0.55555555555555555555];
  case 4
    p = [0.34785484513745385737; 0.65214515186254614263; 0.65214515186254614263; 0.34785484513745385737];
  case 5
    p = [0.23692688505618908751; 0.47862867049936646804; 0.56888888888888888888; 0.47862867049936646804; 0.23692688505618908751];
  case 6
    p = [0.17132449237917034504; 0.36076157304813860757; 0.46791393457269104739; 0.46791393457269104739; 0.36076157304813860757; 0.17132449237917034504];
  case 7
    p = [0.12948496616886969327; 0.27970539148927666790; 0.38183005050511894495; 0.41795918367346938775; 0.38183005050511894495; 0.27970539148927666790;0.12948496616886969327];
end
